<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><{if $title}><{$title}> - <{$config.company}><{else}><{$config.title}><{/if}><{$config.company}></title>
<meta name="description" content="<{$config.description}>">
<meta name="keywords" content="<{$config.keyword}>">
<link href="<{$config.weburl}>/templates/default/user_admin.css" rel="stylesheet" type="text/css" />
<link href="<{$config.weburl}>/templates/default/admin.css" rel="stylesheet" type="text/css" />
<script src="<{$config.weburl}>/script/jquery-1.4.4.min.js" type=text/javascript></script>
<script type="text/javascript" src="script/Validator.js"></script>
<script type="text/javascript" charset="utf-8" src="<{$config.weburl}>/script/district.js" ></script>
<script type="text/javascript">
var searchTxt = ' 搜索商品！';
var SEARCHVALUE = '请输入分类属性名称';
var weburl="<{$config.weburl}>";
function searchFocus(e){
	if(e.value == searchTxt){
		e.value='';
		$('#keyword').css("color","");
	}
}
function searchBlur(e){
	if(e.value == ''){
		e.value=searchTxt;
		$('#keyword').css("color","#999999");
	}
}

function getHTML(v,ob,sscatid,scatid,tcatid)
{	
	if(ob=='tcatid'){
		document.getElementById('scatid').options.length=0;
		document.getElementById('sscatid').options.length=0;
		document.getElementById('scatid').style.visibility="hidden";
		document.getElementById('sscatid').style.visibility="hidden";
	}
	if(ob=='scatid'){
		document.getElementById('sscatid').options.length=0;
		document.getElementById('sscatid').style.visibility="hidden";
	}
	var url = '<{$config.weburl}>/ajax_back_end.php';
	var sj = new Date();
	var pars = 'shuiji=' + sj+'&cattype=com&pcatid='+v;
	$.post(url, pars,showResponse);
	function showResponse(originalRequest)
	{
		if(originalRequest=='')
			return false;
			
		var tempStr = 'var MyMe = ' + originalRequest; 
		var i=1;var j=0;
		eval(tempStr);
		for(var s in MyMe)
		{
			++j;
		}
		if(j>0)
			document.getElementById(ob).style.visibility="visible";
		else
			document.getElementById(ob).style.visibility="hidden";
		document.getElementById(ob).options.length =j+1;
		document.getElementById(ob).options[0].value = '';
        document.getElementById(ob).options[0].text = '<{$lang.select_sub_categories}>';
		document.getElementById(ob).options[0].selected = true;
		for(var k in MyMe)
		{
			var cityId=MyMe[k][0];
			var ciytName=MyMe[k][1];
			document.getElementById(ob).options[i].value = cityId;
			document.getElementById(ob).options[i].text = ciytName;
			
			if(cityId==scatid||cityId==tcatid||cityId==sscatid)
			{
				document.getElementById(ob).options[i].selected = true;
				scityid=cityId;
			}
			i++;
	　	}
		try
		{
			if(ob=='tcatid')
				getHTML(scityid,'scatid',sscatid,scatid,tcatid);
			if(ob=='scatid')
				getHTML(scityid,'sscatid',sscatid,scatid,tcatid);
		}
		catch(e)
		{
			
		}
	 }
　}
</script>
</head>
<div id="shortcut">
    <div class="w">
        <div class="fl">
            <script src="<{$config.weburl}>/login_statu.php"></script>
        </div>
        <div class="fr">
            <a href="<{$config.weburl}>/main.php?cg_u_type=1">进入买家中心</a>
            <a href="<{$config.weburl}>/main.php?m=sns&s=admin_share_product">我的收藏</a>
            <a href="<{$config.weburl}>/main.php?m=message&s=admin_message_list_inbox">站内消息</a>
        </div>
    </div>
</div>
<div class="header">
    <h1>
    	<a href="<{$config.weburl}>" title="<{$config.company}>">
        <img title="<{$config.company}>" alt="<{$config.company}>" src="<{if $config.logo}><{$config.logo}><{else}><{$config.weburl}>/image/default/logo.gif<{/if}>" />
        </a>
        <i>卖家中心</i>
	</h1>
    <div class="search">
        <div class="i-search ld">
        <form method="get" class="form" action="<{$config.weburl}>/">
            <input id="m" name="m" type="hidden" value="product" />
            <input id="s" name="s" type="hidden" value="list" />
            <input type="text" autocomplete="off" value="<{$smarty.get.key}>" id="key" name="key" class="text">
            <input type="submit" class="search_button" value="搜索">
        </form>
        </div>
        <div class="hotwords">
            <strong>热门搜索：</strong>
            <{insert name="label" type="searchword" temp="search_word" limit=7}>
        </div>
    </div>
</div>
<div class="layout">
	<div class="wrap_shadow">
    	<div class="wrap_all main">
            <div class="chart">
                <div title="请选择店铺分类" class="pos_x1 bg_a1"></div>
                <div title="填写店主和店铺信息" class="pos_x2 bg_b2"></div>
                <div title="完成" class="pos_x3 bg_c"></div>
            </div>
            <div class="form-style">
			<form action="" method="post" onSubmit="return Validator.Validate(this,3)">
            <input type="hidden" value="edit" name="submit">
            <dl>
                <dt><em>*</em>店铺名称：</dt>
                <dd>
                <p><input name='company' type='text' value="<{$de.company}>" class="w400 text" dataType="Require" msg="<{$lang.ar_company}>"></p>
                <p class="hint">店铺名称请控制长度不超过20字 </p>
                </dd>
            </dl>
            <dl>
                <dt>主营商品：</dt>
                <dd>
                	<p><textarea class="textarea w394" rows="2" name="main_pro"><{$de.main_pro}></textarea></p>
                    <p class="hint">主营商品关键字（Tag）有助于搜索店铺时找到您的店铺<br />关键字最多可输入50字，请用","进行分隔，例如”男装,女装,童装”</p>
                </dd>
            </dl>
            <dl>
                <dt><em>*</em>店铺分类：</dt>
                <dd>
                	<p>
                    <select class="select" name="catid" id="catid" onChange="getHTML(this.value,'tcatid')" dataType="Require" msg="请选择店铺分类">
                    <option value=""><{$lang.selec_category}></option>
                    <{foreach item=list from=$cat}> <option value="<{$list.id}>" ><{$list.name}>
                    </option>
                    <{/foreach}>
                    </select>
                    <select class="select" style="visibility:hidden" name="tcatid" id="tcatid" onChange="getHTML(this.value,'scatid')">
                    </select>
                    <select class="select" style="visibility:hidden" name="scatid" id="scatid" onChange="getHTML(this.value,'sscatid')">
                    </select>
                    <select class="select" style="visibility:hidden"  name="sscatid" id="sscatid">
                    </select>
                    </p>
                </dd>
            </dl> 
            <dl>
                <dt><em>*</em>所在地区：</dt>
                <dd>
                <input type="hidden" name="t" id="t" value="<{$de.area}>" />
                <input type="hidden" name="province" id="id_1" value="<{$de.provinceid}>" />
                <input type="hidden" name="city" id="id_2" value="<{$de.cityid}>" />
                <input type="hidden" name="area" id="id_3" value="<{$de.areaid}>" />
                <select id="select_1" onChange="district(this);" dataType="Require" msg="请选择所在地区">
                <option value="">--请选择--</option>
                <{$prov}>
                </select>
                <select id="select_2" onChange="district(this);" class="hidden"></select>
                <select id="select_3" onChange="district(this);" class="hidden"></select>			
          		</dd>
            </dl>
            <dl>
                <dt><em>*</em>详细地址：</dt>
                <dd>
                <p><input type='text' name='addr' value="<{$de.addr}>" maxlength="200" class="text w400" dataType="Require" msg="请填写详细地址" ></p>
                <p class="hint">不必重复填写所在地区</p>  
          		</dd>
            </dl>
            <dl>
                <dt><em>*</em>联系电话：</dt>
                <dd><input type='text' name='tel' value="<{$de.tel}>" dataType="Require" msg="<{$lang.ar_tel}>" class="text w150"></dd>
            </dl>
            <dl>
                <dt>店铺简介：</dt>
                <dd>
                <script charset="utf-8" src="<{$config.weburl}>/lib/kindeditor/kindeditor-min.js"></script>
				<script>
                var editor;
                KindEditor.ready(function(K) {
                    editor = K.create('textarea[name="intro"]', {
                        
						items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|','about'],
						autoHeightMode : true,
						afterCreate : function() {
							this.loadPlugin('autoheight');
						}
                    });
                });
                </script>
                <textarea name="intro"></textarea>
                </dd>
            </dl>
            <dl class="foot">
                <dt>&nbsp;</dt>
                <dd>
                <input type="hidden" name="grade" value="1"/>
                <input type="submit" value="提交" class="submit" /></dd>
            </dl>
            </form> 
            </div>
    	</div>
    </div>
</div>
<div id="footer">
  <p><{$web_con}></p>
  <{$bt}><br>
</div>
</body>
</html>


